home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / db3debug.arc / READTHIS.PRG < prev   
Encoding:
Text File  |  1986-04-29  |  2.3 KB  |  94 lines

  1.  
  2.  
  3.                        DEBUGGER.PRG
  4.  
  5. This program is quite simple to use and works on all dBASE III
  6. programs.  The DEBUGGER will list and modify each line of your
  7. program file. 
  8.  
  9.           1. All commands and text are put into uppercase.                                     
  10.  
  11.           2. All IF, ENDIF, DO WHILE, ENDDO, DO CASE, ENDCASE 
  12.              statements will be paired up and attempted to be
  13.              matched. If there is an unmatched pair, you will
  14.              be informed of the mismatched pair.
  15.  
  16.           3. You have the option of a hardcopy of the newly
  17.              debugged program. The hardcopy will have line numbers
  18.              for easier debugging.
  19.  
  20.           4. All the lines of your code will be intented for easier
  21.              debugging and just plain good programming style.
  22.                Below, are two examples of how DEBUGGER works. The
  23.                first display shows the program in it rough state.
  24.                the second, after it was run through DEBUGGER.
  25.  
  26.  
  27.  
  28. Unedited program :
  29.         
  30. clear
  31. select 1
  32. set index TO LAST
  33. do while .T.
  34. store ' ' to answer
  35. @ 10,15 say 'Type P for printer.  S for screen'
  36. @ 12,20 get answer picture '!'
  37. @ 16,15 say 'or press RETURN for previous menu.'
  38. read
  39. clear
  40. if answer=' '
  41. clear
  42. return
  43. endif 
  44. if answer ='S'
  45. go top       
  46. do rpt2       
  47. clear        
  48. else    
  49. clear      
  50. @ 10,15 say 'Please wait.  Currently printing...'
  51. do rpt1.prg         
  52. clear       
  53. endif    
  54. enddo
  55. return
  56.  
  57.                           
  58. รจ                           
  59.         
  60.          
  61. Revised program :
  62.  
  63. CLEAR
  64. SELECT 1
  65. SET INDEX TO LAST
  66. DO WHILE .T.
  67.    STORE ' ' TO ANSWER
  68.    @ 10,15 SAY 'TYPE P FOR PRINTER.  S FOR SCREEN'
  69.    @ 12,20 GET ANSWER PICTURE '!'
  70.    @ 16,15 SAY 'OR PRESS RETURN FOR PREVIOUS MENU.'
  71.    READ
  72.    CLEAR
  73.    IF ANSWER=' '
  74.       CLEAR
  75.       RETURN
  76.    ENDIF
  77.    IF ANSWER ='S'
  78.       GO TOP
  79.       DO RPT2
  80.       CLEAR
  81.    ELSE
  82.       CLEAR
  83.       @ 10,15 SAY 'PLEASE WAIT.  CURRENTLY PRINTING...'
  84.       DO RPT1.PRG
  85.       CLEAR
  86.    ENDIF
  87. ENDDO
  88. RETURN
  89.  
  90.  
  91.  
  92. To start DEBUGGER simply type   DO DEBUGGER   at the dBASE dot prompt.
  93.  
  94.  
  95. Enjoy!